VCN: VC4 stand-pat, VC5 check ordering, PASS in TT#36
Closed
VCN: VC4 stand-pat, VC5 check ordering, PASS in TT#36
Conversation
…tion Co-authored-by: dhbloo <32353216+dhbloo@users.noreply.github.com>
Co-authored-by: dhbloo <32353216+dhbloo@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add new VCN search mode to Rapfi
Add VCN (Victory by Continuous N-level Attack) search mode to alpha-beta searcher
Mar 6, 2026
…quick checks Co-authored-by: dhbloo <32353216+dhbloo@users.noreply.github.com>
Co-authored-by: dhbloo <32353216+dhbloo@users.noreply.github.com>
Copilot
AI
changed the title
Add VCN (Victory by Continuous N-level Attack) search mode to alpha-beta searcher
VCN search: fix TT key segregation in qvcfsearch, remove vcnAllowB4 params, merge PASS stages
Mar 7, 2026
Co-authored-by: dhbloo <32353216+dhbloo@users.noreply.github.com>
Copilot
AI
changed the title
VCN search: fix TT key segregation in qvcfsearch, remove vcnAllowB4 params, merge PASS stages
VCN cleanup: namespace, options consolidation, vcnLevel derivation from parent, PASS/TT safety
Mar 7, 2026
…/history fix Co-authored-by: dhbloo <32353216+dhbloo@users.noreply.github.com>
Copilot
AI
changed the title
VCN cleanup: namespace, options consolidation, vcnLevel derivation from parent, PASS/TT safety
VCN: VC4 stand-pat, VC5 check ordering, PASS in TT
Mar 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three correctness fixes to the VCN search implementation covering stand-pat semantics in VC4 mode, VC5 quick-check ordering, and safe use of PASS as a TT best move.
VC4 stand-pat disabled in
vcfsearch()In VC4 mode the attacker must find a VCF sequence — returning static eval as "good enough" is wrong.
vcfsearch()now initialisesbestValue = mated_in(ss->ply + 2)whenvcnAllowB4, bypassing stand-pat and delta-pruning entirely:mated_in(ss->ply + 2)(correct)bestValuenormallyif (PvNode && bestValue > alpha) alpha = bestValue;replaces the two duplicated alpha-update branchesVC5 quick check reordered
Vcn::vc5AttackerLoses()is now evaluated before the board-filled/max-ply draw check in bothsearch()andvcfsearch(). A VC5 attacker with no A_FIVE should always returnmated_in(ss->ply), never a draw score, even when the board is full.PASS as TT best move
The hashtable already encodes
Pos::PASSsafely (move + 1offset, seehashtable.cpp), so the previous filterbestMove == Pos::PASS ? Pos::NONE : bestMoveinTT.storeis reverted. Instead, the three call sites that reachboard.cell(ttMove)— which assertspos >= 0and crashes forPos::PASS— are individually guarded:MovePickerMAIN constructorargs.ttMove != Pos::PASSbeforeboard.cell()in DEFENDFIVE/DEFENDFOURMovePickerQVCF constructorHistoryTracker::updateTTMoveStatsttMove == Pos::PASSafterisLegalcheckupdateBestmoveStatsretains its existingbestMove != Pos::PASSguard unchanged.💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.